﻿using Architecture.Domain.Service;
using Architeture.Domain;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand.Mach;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler.Mach
{
    public class MachiningSelectCommandHandler : IRequestHandler<MachiningSelectCommand, machiningInfo>
    {
        protected readonly IMachiningSerivce serivce;

        public MachiningSelectCommandHandler(IMachiningSerivce serivce)
        {
            this.serivce = serivce;
        }

        public async Task<machiningInfo> Handle(MachiningSelectCommand request, CancellationToken cancellationToken)
        {
            return await serivce.GetMachinfo(request.id);
        }
    }
}
